package com.ty.day1.home;

/**
 * Created by IntelliJ IDEA.
 *
 * @author : txy
 * @create : 2023/11/14 18:07
 */
public class Student {
    String id;
    String name;
    String sex;
    Integer age;
    public void study(){
        System.out.println(name + "爱学习");
    }
    public void study(String object){
        System.out.println(name + "学习"+object);
    }
    public void eat(){
        System.out.println(name + "爱吃饭");
    }
    public void eat(String food){
        System.out.println(name + "爱吃"+food);
    }

    @Override
    public String toString() {
        return "Student{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", sex='" + sex + '\'' +
                ", age=" + age +
                '}';
    }
}
